﻿<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>网站基本设置 - 专题管理</title>
<script src="/js/jquery.js" type="text/javascript"></script>
<script src="/js/jspublic.js" type="text/javascript"></script>
<script src="js/easyui/jquery.easyui.js" type="text/javascript"></script>
<script src="js/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<link href="style/right.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">

	$(function(){

		if (window.frameElement == null) self.location = '/manage';
	
		$('.Update').window({
			modal:true,
			closed:true,
			collapsible:false,
			minimizable:false,
			maximizable:false,
			closable:true,
			draggable:false,
			resizable:false,
			inline:false
		});
	
		$('#MyDataGrid').datagrid({
			scrollbarSize: 0,
			fitColumns: true,
			resizable: false,
			checkOnSelect: false
		});
		
		$(window).resize(function(){
			$("#MyDataGrid").datagrid("resize");
		});
		
		$('.edit').bind('click', function(){
			var id = $(this).attr('aid');
			var dname = $(this).attr('dname');
			var aurl = "admin_update.aspx?T=" + dname + "&id=" + id;
			if(id!=""&&id!=null){
				switch(dname)
				{
					case "b_image":
					    $('#form2').attr('action', aurl);
						$('#' + dname).window('open');
						break;
					default:
						break;
				}
			}			
		});
	
	});
	
	function reloadGrid() {
		$('#MyDataGrid').datagrid('reload');
	}
	
</script>
</head>

<body>
<div class="zs_content">

	<div class="zs_quota">
		<h4>网站基本设置 - 专题管理</h4>
	</div>
	
	<div class="zs_quota">
		<table id="MyDataGrid">
			<thead>
				<tr>
					<th field="upload" align="center" style="width: 35px;"></th>
					<th field="undo" align="center" style="width: 35px;"></th>
					<th field="recommendName" align="left" data-options="fitColumns:true" width="100%">专题名称</th>
					<th field="class" align="center" style="width: 35px;">类别</th>
					<th field="peo" align="center" style="width: 35px;">发布人</th>
					<th field="img" align="center" style="width: 35px;">专题图片</th>
				</tr>
			</thead>
			<tbody>
				{fenye:B_ask^10^a_id desc^a_recommend=1}			
				<tr>
					<td align="center">
						<a class="edit easyui-linkbutton" aid="{a_id}" dname="b_image" data-options="iconCls:'icon-upload'" title="上传图片"></a>
					</td>
					<td align="center">
						<a class="edit easyui-linkbutton" href="admin_update.aspx?T=b_removeRecommend&id={a_id}" data-options="iconCls:'icon-undo'" title="撤销专题"></a>
					</td>
					<td><a class="listtitle" href="admin_urls.aspx?template=template/t_admin_ask_info.html&id={a_id}">{a_mtitle}</a></td>
					<td align="center">{g:B_askClass$a_className@a_classid={a_classid}}</td>
					<td><a href="admin_urls.aspx?template=template/t_admin_user_info.html&id={u_id}">{g:B_user$u_nickName@u_id={u_id}}</a></td>
					<td><a href="/uploadfiles/rec/{a_img}" target="_blank"><img src="/uploadfiles/rec/th/{a_img}" border="0" width="20" height="20" /></a></td>
				</tr>
				{/fenye}
			</tbody>
		</table>        
		<div class="tools">
        	<div class="pagination pagination-right">
				<ul>{$page}</ul>
            </div>
		</div>
	</div>
	
</div>

<div style="display:none;">
	<div id="b_image" class="Update" title="修改分类">
		<form id="form2" name="form2" action="" method="post" enctype="multipart/form-data">
		<ul>
			<li>
				<label>请选择图片：</label>
				<input type="file" name="a_image" id="a_image" />
			</li>
			<li>
				<input type="submit" value="上传" class="btn btn-primary" />
				<input type="button" value="取消" class="btn btn-primary" onclick="$('.Update').window('close')" />
			</li>
		</ul>
		</form>
	</div>
</div>
	
</body>
</html>